{% extends 'base.html' %}

{% block container %}
<div class="top-pad">
    <img src="{{ url_for('static', filename='uploads/' + product.image_path) }}" width="500"/>
    <h1>{{ product.name }}<small>{{ product.category.name }}</small></h1>
    <h3>{{ product.price }}</h3>
    <h3>
        <p>
            <a href="{{ url_for('catalog.update_product', id=product.id) }}" style="color: #a22dc6">编辑</a>
            <a href="{{ url_for('catalog.delete_product', id=product.id) }}" style="color: red"
       onclick="{if(confirm('确定删除吗?')){this.document.formname.submit();return true;}return false;}">删除</a>
        </p>
    </h3>
</div>
{% endblock %}
